#ifndef _MSG_PORT_H_
#define _MSG_PORT_H_

#include "common.h"
#include "gobal.h"

class MsgQueue
{
	public:
		bool PushMsg(MSG_HEAD* msgHead, int msgLen);
		MSG_HEAD* PopMsg();
		int GetSize();
	private:
		std::deque<MSG_HEAD*> m_MsgDeque;
		static MsgQueue* s_MsgQueue;
		Mutex m_Mutex;

		struct CNetMsg
		{
			int MSG_TYPE;
			int MSG_SIZE;
			char m_buffer[MSG_BUFFER_SIZE];		
		};

	public:
		static MsgQueue* GetInstance();

};



#endif
